<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--<html>--%>
<%--<head>--%>
<%--    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">--%>
<%--    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>--%>
<%--    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>--%>
<%--    <title>运行结果</title>--%>
<%--</head>--%>
<%--<body>--%>
<div>
    <c:choose>
        <c:when test="${interruntWeb.status == 0}">
            <h4>通过</h4>
        </c:when>
        <c:otherwise>
            <h4>不通过原因:
                <small>
                    <pre style="width:850px;overflow:scroll;height: 90px;white-space:pre-wrap;word-wrap:break-word;">${interruntWeb.message}</pre>
                </small>
            </h4>
        </c:otherwise>
    </c:choose>
</div>
<div>
    <div class="progress">
        <div class="progress-bar" role="progressbar"
             aria-valuenow="100" aria-valuemin="0"
             aria-valuemax="100" style="width: 100%;">
        </div>
    </div>
</div>
<div>
    <h4>请求URL:<small>${interruntWeb.httpurl}</small></h4>
    <c:choose>
        <c:when test="${interruntWeb.httpmeth == 1}">
            <h4>请求方式:<small>GET</small></h4>
        </c:when>
        <c:otherwise>
            <h4>请求方式:<small>POST</small></h4>
        </c:otherwise>
    </c:choose>
    <c:choose>
        <c:when test="${interruntWeb.postparamtype == 1}">
            <h4>参数类型:<small>JSON</small></h4>
        </c:when>
        <c:otherwise>
            <h4>参数类型:<small>X-WWW-FROM</small></h4>
        </c:otherwise>
    </c:choose>
    <div class="form-group">
        <h4>请求header:</h4>
        <textarea class="form-control" rows="3">${interruntWeb.httpheader}</textarea>
    </div>
    <div class="form-group">
        <h4>请求Cookie:</h4>
        <textarea class="form-control" rows="3">${interruntWeb.httpcookie}</textarea>
    </div>
    <div class="form-group">
        <h4>请求Body:</h4>
        <textarea class="form-control" rows="3">${interruntWeb.httpparam}</textarea>
    </div>
</div>
<div>
    <div class="progress">
        <div class="progress-bar" role="progressbar"
             aria-valuenow="100" aria-valuemin="0"
             aria-valuemax="100" style="width: 100%;">
        </div>
    </div>
</div>
<div name="resinfo">
    <div class="col-md-7" name="checkinfolist" style="display: inline-block">
        <table class="table table-bordered" style="table-layout: fixed;word-break: break-all;border-collapse: collapse;">
            <caption>预期值:</caption>
            <thead>
            <tr>
                <th style="width: 40%">内容</th>
                <th style="width: 30%">校验方式</th>
                <th style="width: 30%">预期结果</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${interruntWeb.checkInfoWebs}" var="checkinfo">
                <tr>
                    <td>${checkinfo.checkinfo}</td>
                    <td>${checkinfo.autoExpectEnum}</td>
                    <td>${checkinfo.expectinfo}</td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
    <div class="col-md-5" name="responseinfo" style="display: inline-block">
        <h4>实际响应值:</h4>
        <h4>状态码:<small>${interruntWeb.rescode}</small></h4>
        <div class="form-group">
            <h4>响应header:</h4>
            <textarea id="resheaderinfo" class="form-control" rows="3">${interruntWeb.resheader}</textarea>
        </div>
        <div class="form-group">
            <h4>响应Cookie:</h4>
            <textarea class="form-control" rows="3">${interruntWeb.rescookie}</textarea>
        </div>
        <div>
            <h4>响应结果:</h4>
            <pre style="height:500px;overflow:scroll;white-space:pre-wrap;word-wrap:break-word" id="responseinfo">${interruntWeb.resinfo}</pre>
        </div>
    </div>
</div>
<%--</body>--%>
<%--</html>--%>
